<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
    <!--<link th:href="@{/admin/lib/md/css/style.css}" rel="stylesheet"/>-->
    <!-- editor.md -->
    <link th:href="@{/admin/lib/editormd/css/editormd.css}" rel="stylesheet"/>
    <!-- editor.md -->
    <script th:src="@{/admin/lib/editormd/src/editormd.js}"></script>
</head>
<body>
<div id="my-editormd">
    <textarea id="my-text" name="my-text" style="display:none;" class="markdown-textarea"></textarea>
    <!-- 注意：name属性的值-->
    <textarea id="text" name="text" style="display:none;"></textarea>
</div>
<script type="text/javascript">
    $(function () {
        editormd("my-editormd", {//注意1：这里的就是上面的DIV的id属性值
            width: "90%",
            height: 640,
            syncScrolling: "single",
            emoji: true,
            path: "/admin/lib/editormd/lib/",//注意2：你的路径
            saveHTMLToTextarea: true,//注意3：这个配置，方便post提交表单
            /**上传图片相关配置如下*/
            imageUpload: true,
            imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"], //图片上传格式
            imageUploadURL: "/test/file",
            onload: function (obj) { //上传成功之后的回调
            }
        });
    });
</script>
</body>
</html>